{extend name="public:body" /}

{block name="header"}
  <div class="layui-tab layui-tab-brief">
    <ul class="layui-tab-title" style="padding:10px 0;height:30px;">
      <li><a href="JavaScript:history.go(-1)">信息列表</a></li>
      <li class="layui-this"><a href="#">审核订单</a></li>
    </ul>
  </div>
{/block}

{block name="body"}
  <form class="form-horizontal" action="{:url('audit')}" method="post">
    <style>
      .layui-form-item .layui-input-inline {
        width: 500px;
      }
      [disabled] {
        cursor: not-allowed;
      }
    </style>

    <input class="layui-input hidden" type="text" value="{$id}" name="id">
    <div class="layui-form" style="margin-top:15px;">
      <div class="layui-form-item">
        <label class="layui-form-label">审核状态</label>
        <div class="layui-input-inline">
          <select name="status_name" lay-verify="required" lay-filter="select">
            {foreach $list as $k => $v}
              {if $status == $k}
              <option selected value="{$tips[$k]}">{$v}</option>
              {else /}
              <option value="{$tips[$k]}">{$v}</option>
              {/if}
            {/foreach}
          </select>
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">提示信息</label>
        <div style="color: red" class="layui-input-inline" id="tips">
          {$tips[$status]}
        </div>
      </div>
      <div class="layui-form-item">
        <div class="layui-input-block">
          <button type="button" class="layui-btn btn btn-primary ajax-post" autocomplete="off">
            提交
          </button>
          <a class="layui-btn layui-btn-primary" href="JavaScript:history.go(-1)">返回</a>
        </div>
      </div>
    </div>
  </form>

  <script>
    layui.use(['form'], function() {
      var form = layui.form

      form.on('select(select)', function(data){
        $('#tips').html(data.value)
      })
    })
  </script>
{/block}
